<!DOCTYPE html>
<html>
<head>
<title>Topic View</title>
<!-- Jquery -->
	<script src="js/jquery-1.11.2.min.js"></script>
	<!-- AngularJS -->
	<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
	<!-- Angular application -->
	<script type="text/javascript" src="js/Topic.js"></script>
	<!-- Bootstrap -->
	<link href="css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" href="css/topic.css"/>
</head>
<body class="bodyBg">
	<div ng-app="TopicApp" >
		<div ng-controller="TopicController" ng-init="update();">	
		{{ CheckSession()}}
	<!-- The NAV bar with buttons and header -->
	<nav class="navbar navbar-default navStyle" role="navigation">
	
   		<div class="navbar-header">
   			<h2 class="headerStyle">Surfers Paradise</h2></div>
   		<div class="navbar-collapse collapse" id="navbar-footer">
       		<ul class="nav navbar-nav navbar-right">   				
   				<li><button type="button" class="homeBtn btn btn-danger navbar-btn" ng-click = "GoToHomePage()">Home</button></li>
   				<li><button type="button" class="disbtn btn btn-success navbar-btn" ng-click=" update();" ng-show="showtopicupdatebutton" >Show New Messages</button></li>
 			</ul>
 		</div>
   	</nav>
   		
   		<h2 class= "topicnameStyle">Top messages about topic - <span id = "topicName"></span></h2>
   				
			 <div id="messageDesply" ng-repeat="x in TopicTenMessagesArray track by x.MessageId" >
    			<div class="message">
					<div class="messageBody">
						<div class="messageHead">
							<div class="pull-left about">Topic <a href="topic.html?topic={{x.Topic}}" class="highlight" ng-bind="x.Topic"></a>: 
							</div>
								<br/><span class="msgStyle" ng-bind-html="setcheck(x.HtmlTopicVersion)"></span>
							<div>
								<br><span class="posted">Posted by <a class="highlight2" href="MyProfile.html?profile={{x.Autor}}" ng-bind="x.Autor"></a> </span><span class="posted" ng-bind=" x.TimeOfPublish | HomeMessageDate">
								</span>
							</div>
						</div>
					</div>
					</div>
				</div>
  			</div> 
		</div>
</body>
</html>